package cn.gson.crm.model.pojos;

import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;

@Entity
@Table(name = "Sales_AT", schema = "CRM", catalog = "")
public class SalesTarget {
    private long salestId;
    private Time salesTime;
    private Integer salesValue;
    private Long salesStaffid;
    private Integer salesAccomplish;
    private String salesRemarks;
    private Long salesDepartment;

    @Id
    @Column(name = "Salest_id")
    public long getSalestId() {
        return salestId;
    }

    public void setSalestId(long salestId) {
        this.salestId = salestId;
    }

    @Basic
    @Column(name = "Sales_time")
    public Time getSalesTime() {
        return salesTime;
    }

    public void setSalesTime(Time salesTime) {
        this.salesTime = salesTime;
    }

    @Basic
    @Column(name = "Sales_value")
    public Integer getSalesValue() {
        return salesValue;
    }

    public void setSalesValue(Integer salesValue) {
        this.salesValue = salesValue;
    }

    @Basic
    @Column(name = "Sales_staffid")
    public Long getSalesStaffid() {
        return salesStaffid;
    }

    public void setSalesStaffid(Long salesStaffid) {
        this.salesStaffid = salesStaffid;
    }

    @Basic
    @Column(name = "Sales_accomplish")
    public Integer getSalesAccomplish() {
        return salesAccomplish;
    }

    public void setSalesAccomplish(Integer salesAccomplish) {
        this.salesAccomplish = salesAccomplish;
    }

    @Basic
    @Column(name = "Sales_remarks")
    public String getSalesRemarks() {
        return salesRemarks;
    }

    public void setSalesRemarks(String salesRemarks) {
        this.salesRemarks = salesRemarks;
    }

    @Basic
    @Column(name = "Sales_department")
    public Long getSalesDepartment() {
        return salesDepartment;
    }

    public void setSalesDepartment(Long salesDepartment) {
        this.salesDepartment = salesDepartment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SalesTarget that = (SalesTarget) o;
        return salestId == that.salestId &&
                Objects.equals(salesTime, that.salesTime) &&
                Objects.equals(salesValue, that.salesValue) &&
                Objects.equals(salesStaffid, that.salesStaffid) &&
                Objects.equals(salesAccomplish, that.salesAccomplish) &&
                Objects.equals(salesRemarks, that.salesRemarks) &&
                Objects.equals(salesDepartment, that.salesDepartment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(salestId, salesTime, salesValue, salesStaffid, salesAccomplish, salesRemarks, salesDepartment);
    }
}
